﻿Imports lbGlobalcom
Public Class cTipoGasto
    Dim drTipoGas As dsCaja.CAJ_TIPOGASTORow
    Sub New(ByVal idGasto As String)
        Try
            Dim daGas As New dsCajaTableAdapters.CAJ_TIPOGASTOTableAdapter
            Dim dtGas As dsCaja.CAJ_TIPOGASTODataTable = daGas.GetDataByidTipoGasto(idGasto)
            If dtGas.Rows.Count = 0 Then
                Throw New Exception("No existe un tipo de gasto con este id, favor verificar e intentar de nuevo")
            Else
                drTipoGas = dtGas.Rows(0)
            End If
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public ReadOnly Property idGasto() As String
        Get
            Return drTipoGas.IDGASTO
        End Get
    End Property

    Public ReadOnly Property Descripcion() As String
        Get
            Return drTipoGas.DESCRIPCION
        End Get
    End Property

End Class
